#ifdef GL_ES
#define LOWP lowp
precision mediump float;
#else
#define LOWP  
#endif

attribute vec4 a_position;

uniform mat4 u_projectionMatrix;
uniform vec4 lightPos;
  
varying vec4 v_texCoords;
varying vec3 v_viewRay;
void main()
{
	vec4 pos = vec4((lightPos.xyz + a_position.xyz / lightPos.w),1.0); 
	v_viewRay = pos.xyz; 
	v_texCoords = u_projectionMatrix * pos; 
	gl_Position = v_texCoords;
	v_texCoords.xy += v_texCoords.w;
	v_texCoords.xy *=0.5;	
}